package demo;
import java.util.*;
public class Main {




        private static String seekBrokenKeys(String exepect,String actual){
            char[]arrExe=exepect.toUpperCase().toCharArray();
            char[]arrAct=actual.toUpperCase().toCharArray();
            Set<Character> set=new TreeSet<>();
            List<Character> ans=new ArrayList<>();
            for(char ch:arrAct){
                set.add(ch);
            }
            for(char e:arrExe) {
                if(!set.contains(e)){
                    //找出未输出的字符
                    if(!ans.contains(e)){
                        //找出答案里未重复的字符
                        ans.add(e);
                    }
                }

            }
            StringBuilder str=new StringBuilder();
            for(char a:ans){
               // 将字符添加到字符串末尾
                str.append(a);

            }
            //StringBuilder转为String
            return str.toString();

        }


        public static void main(String[]args){

            Scanner sc=new Scanner(System.in);
            while(sc.hasNextLine()){
                String exepect=sc.nextLine();
                String actual=sc.nextLine();

                String str=seekBrokenKeys(exepect,actual);
                System.out.println(str);
            }

        }
    }



